home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
PROGRAMM
/
DB_CLIPP
/
0769A.ZIP
/
PROPRDMO.PRG
< prev
next >
Wrap
Text File
|
1987-08-28
|
4KB
|
99 lines
LOAD proper
SET TALK OFF
CLEA
TEXT
--- This is a demo of PROPER.BIN (OBJ) ---
This is a short demo of the PROPER BIN (OBJ) program. PROPER can be called
from FoxPLUS, Clipper, QS, or dBASE III PLUS. It's a little redundant from QS
(since it emulates the QS PROPER() function), except that it makes your code a
little more portable.
PROPER just takes a string of characters (not a field variable, only memvars)
and capitalizes the first character of each word. It will only capitalize a
letter which follows either a space or a non-alphanumeric character, as does
QS's PROPER function. In the future I plan to add some enhancements, such as
skipping over words like "a", "an", "the", etc. (except for the first word in
a phrase), and also special handling for "McAnything" etc.
You LINK the OBJ code to your Clipper application. You LOAD PROPER.BIN from
dBASE or FOX. You have a choice with QS--either CCALL PROPER and link it in
(there goes the portability [grin]) or LOAD the BIN routine just as from dBASE.
Since dBASE III Plus doesn't support UDF's, for portability reasons the calling
syntax is exactly the same from any of these environments:
CALL Proper WITH <memvar>
Let's test it:
ENDT
string=spac(254)
@21,1 SAY 'String to make "proper":' GET string PICT "@S40"
READ
string=TRIM(RTRIM(LOWE(string)))
CALL PROPER WITH string
@22,0 SAY "PROPER returns: "+string
WAIT
CLEA
TEXT
PROPER is written in Turbo C. Later (enhanced) versions will probably not be
released as shareware. To get upgrades, etc., subscribe to the Synergy
Utilities. The Synergy Utilities are a collection of tools for dBASE III
Plus, Quicksilver, Clipper, and FoxBASE+. Most of these are BIN/OBJ format
utilities. Some of the other Synergy Utilities are:
ENDT
WAIT
TEXT
CD get current drive/directory
ENCRYPT encrypt/decrypt strings
SRCHPATH search DOS path for file
FINDFL find all files matching a wildcard, return all directory info
NETINFO get net name (more to come)
MEMCHECK check memory on the system, also how much when dBASE was loaded
DIREXIST check existence of drive/directory
FSIZE get size of file(s)
CHATTR change attributes of (files)
SAT SuperAt(), find every occurrence of a substring in one CALL
HANDLES Get *true* amount of available file handles
RAND Random number generator
IN/OUT Port access
LBMRD Litebars using UI's MRD.
SOUNDEX get SOUNDEX codes
DELAY delay specified number (and fraction) of seconds
VALDRIVE find out all valid drives on system
EQUIP find out what equipment you're running on
GETCOLOR find out what the color is on the screen now (at cursor position)
LITEBAR very fast, versatile, portable lightbar menus--also incorporates some
screen stunts such as save/restore screen, hilite/color/fill/fade
windows on screen, scroll windows left/right/up/down, etc.
FRM2PRG convert FRM report files to PRG form for modification/compilation
SINE/COSINE/TANGENT etc.
ENDT
WAIT
CLEA
TEXT
Most of the utilities are available in OBJ form for Clipper CALL and QS CCALL.
Custom modules are a possibility. If they are considered to be useful for
enough people, no charge! Eventually I hope to add all the functions in
Rettig's library, C Tools, etc. (and more). Source code (in assembly
language, C, and Pascal) is available to registered users--also example PRGs
to demonstrate their usage. At this time documentation is in short supply
<grin>, but I'm working on it.
Once you subscribe, you are a member of the Synergy BBS, and can download
newer versions, get support, etc. through the BBS.
To subscribe to the Synergy Utilities, send $75 to:
R. Russell Freeland
Synergy Corp.
1780 SW 43 Ave.
Ft. Lauderdale, FL 33317
...enclose $5 extra for shipping and handling if you want a disk mailed to
you. (Most of the utils are very small, as they are mostly written in
assembly language, so download time is minimal.)
Good luck with PROPER, I hope you enjoy it.
R. Russell Freeland
8/28/1987
CIS 76146,371
ENDT
WAIT
RETU